<?php

/**
 * @author quang
 * @copyright 2011
 */
require_once 'includes/functions/general.php';
require_once ('includes/functions/dal.php');

#using SEssion to store species
if(!isset($_SESSION["species"])){
    $speciesDal = new SpeciesDal();
    $_SESSION["species"] = $speciesDal->selectAll();
}
$content = '<ul id="left">';
$i = 1;
$count = 0;
for($count = 0; $count<5; $count++ ){
    $specy = $_SESSION["species"][$count];
  	$content .= '<li>
                        <img src="'.IMAGE_PATH.$specy->getImg().'" width="60" height="60" />';
      if($strLanguage=='en')
                 $content .= '<span>'.$specy->getContentEn().'</span>';
      else $content .= '<span>'.$specy->getContentFr().'</span>';
        $content .= '  <input type="radio" name="answer" value="'.$i.'" />
                   </li>';
      $i++;

}
$content .= '</ul> ';

$content .= '<ul id="right">';

for($count = ($i -1); $count< count($_SESSION["species"]); $count++ ){
    $specy = $_SESSION["species"][$count];
  	$content .= '<li>
                        <img src="'.IMAGE_PATH.$specy->getImg().'" width="60" height="60" />';
      if($strLanguage=='en')
                 $content .= '<span>'.$specy->getContentEn().'</span>';
      else $content .= '<span>'.$specy->getContentFr().'</span>';
        $content .= '  <input type="radio" name="answer" value="'.$i.'" />
                   </li>';
      $i++;
}             
$content .= '</ul>
                  <input type="hidden" value="0" name="hidAns" id="hidAns"/>
          ';
echo $content;

?>